home *** CD-ROM | disk | FTP | other *** search
/ PC Magazine Back Issue Database / MMX PCs - PC Magazine Back-Issue Database - 02-1996-01-1997 (Volume 5 Number 1)(Ziff-Davis)(1997).ISO / pcmagcd.inf < prev    next >
INI File  |  1996-10-18  |  16KB  |  459 lines

  1. ;;*****************************************************************
  2. ;;* Copyright (c) 1995-1996 by Dataware Technologies, Inc., All Rights Reserved.
  3. ;;*
  4. ;;* pcmagcd.inf
  5. ;;*
  6. ;;* $History: PCMAGCD.INF $    
  7. ;;*
  8. ;;* MODULE DESCRIPTION:
  9. ;;*
  10. ;;*        This file is the installation script file for the PC Magazine
  11. ;;*        CD written for the Installit for Windows program.  This script 
  12. ;;*        file is used by Installit at installation time to perform the 
  13. ;;*        desired installation.  It contains step-by-step instructions for
  14. ;;*        installing the PC Magazine CD.  
  15. ;;*
  16. ;;* LOCALS:    
  17. ;;*     
  18. ;;*        SetupDisplay              -sets up screen display for installation
  19. ;;*        ShowWelcome             -shows a welcome dialog to the user
  20. ;;*        ShowDone                -shows the user a completion dialog 
  21. ;;*        ComponentSelection        -allows the user to choose installation components
  22. ;;*        NoSelection              -tells the user no components had been chosen to install
  23. ;;*        InstallPCMagazineCD        -installs the PC Magazine CD files
  24. ;;*        InstallMSVideo             -runs MS Video installation program
  25. ;;*        InstallBackIssueDB        -runs the back issue DB installation program
  26. ;;*        InstallWinCIM             -runs the WinCim installation program            
  27. ;;*        ShowGroups                -shows new Windows desktop groups
  28. ;;*        DDENonFatalErrorTrap     -intercepts non-fatal DDE errors
  29. ;;*        ByeNow                    -terminates the program installation    
  30. ;;*
  31. ;;* GLOBALS:
  32. ;;*
  33. ;;*     n/a
  34. ;;*   
  35. ;;* RELEVANT DOCUMENTATION:
  36. ;;*
  37. ;;*     n/a       
  38. ;;*
  39. ;;* PORTABILITY ISSUES:
  40. ;;*
  41. ;;*        n/a
  42. ;;*
  43. ;;* FILES USED:  
  44. ;;*
  45. ;;*        pcmagcd.pvd
  46. ;;*   
  47. ;;****************************************************************/
  48.  
  49. DefineVariables
  50.  
  51.     Text    [ProductName]            := PC Magazine CD Vol. 4 No. 2 ;;Program Manager Item Name   
  52.     Text    [ProductGroup]            := PC Magazine CD    ;;Program Manager Group Name
  53.     Text    [VolumeNumber]            := Vol. 4 No. 2  
  54.     Text    [LogoBitMap]            := instbmp.bmp        ;; store install bitmaps on CD 4.7.94
  55.     Text    [IconCmdLine]            := pcmagcd.exe        ;;Primary executable
  56.     Text    [IconFile]                := PCMAGCD.ICO
  57.     Text    [IconPath]                 ;; store install icon on CD 4.7.94  
  58.     Text    [InstDrive] 
  59.     Text    [ExePath]
  60.     Text    [UninstallIconPath]
  61.     Text    [UninstallIcon]            := pcuninst.ico
  62.     Text    [PCMAG]                    := PC Magazine CD software (Required) 
  63.     Text    [PartSize]                := 
  64.     Text    [CMPSEL]                 := PC Magazine Back-Issue Database (One year of PC 
  65.     Text    [CMPSEL2]                := Magazine text in a searchable database)
  66.     Text    [CmpSize]                := 2,500kb
  67.     Text    [MSVIDEO]                := Microsoft Video for Windows Ver 1.1 Runtime files (Required
  68.     Text    [MSVIDEO1]                := for video portions). This option requires a Windows restart. 
  69.     Text    [MSVIDEO2]                := NOTICE: Do not install if you are running under Windows 95 or if
  70.     Text    [MSVIDEO3]                := you have a later version of MS Video for Windows on your system.         
  71.     Text    [MSVidSize]                := 2,500kb                         3,327kb 
  72.     Text    [WinCim]                := CompuServe access software
  73.     Text    [WinCimSize]            := X,XXXkb
  74.  
  75.     Number    [nInstallPCMagazineCD]     := 1    ;;checked check-box from the start
  76.     Number    [nInstallBackIssueDB]     := 1    ;;acp -changed all check-boxes to 1 - 4.22.94
  77.     Number    [nInstallMSVideo]         := 0    ;;acp -changed all check-boxes to 1 - 4.22.94
  78.     Number    [nWinCim]                := 0
  79.     Number    [nComponentFlag]         := 0
  80.     Number    [PleaseBox]                := 0    ;;acp added for please select 1 text box - 4.22.94
  81.     Number    [FinalOKBox]            := 0    ;;acp added for final text box - 4.22.94
  82.     Number    [WelcomeBox]             := 0 
  83.     Number    [ComponentListBox]         := 0
  84.     Number    [Continue]                := 1001    
  85.     Number    [Cancel]                := 1111    ;;Cancel changed to 1111 - 4.27.94 ACP  
  86.     Number    [InstalledFlag]            ;; used to create ini file
  87.     Text    [FileVer]
  88. EndDefineVariables
  89.  
  90.  
  91. ;;********************************************************************
  92. ;;
  93. ;; Beginning of program area
  94. ;;
  95. ;;********************************************************************
  96.  
  97.     SetReplacementInquiry off    ;; will not prompt to replace logo
  98.  
  99.     Do SetupDisplay
  100.     Do ShowWelcome
  101. [Point1]
  102.     Do ComponentSelection
  103.     If ( [nComponentFlag] = 0 ) 
  104.         Do NoSelection
  105.         GoTo [Point1]
  106.     EndIf
  107.         ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  108.         ;; This is the code to determine which    ;;
  109.         ;; components are loaded        ;;
  110.  
  111.     SetReplacementInquiry off    ;;System will not ask; it will OVERWRITE ALL existing files
  112.  
  113.     If [nInstallPCMagazineCD] <> 0    ;;Load PC Mag
  114.         Do InstallPCMagazineCD
  115.     EndIf
  116.  
  117.     ;;Load Computer Select
  118.     If [nInstallBackIssueDB] <> 0
  119.         Do InstallBackIssueDB
  120.     EndIf
  121.  
  122.     If [nWinCim] <> 0 ;; if wincim selected
  123.         Do InstallWinCim
  124.     EndIf
  125.  
  126.     ;; Moved this to end because this installation asks user to restart Windows.
  127.     If [nInstallMSVideo] <> 0
  128.         Do InstallMSVideo
  129.     EndIf
  130.  
  131.     Do ShowGroups
  132.     Do ShowDone
  133.  
  134. ;;********************************************************************
  135. ;;
  136. ;; End of program area
  137. ;;
  138. ;;********************************************************************
  139.  
  140.  
  141. ;;********************************************************************
  142. ;;
  143. ;; Beginning of procedure area
  144. ;;
  145. ;;********************************************************************
  146.  
  147. ;;****************************************************************
  148. ;;*
  149. ;;* SetupDisplay 
  150. ;;*
  151. ;;* DESCRIPTION:      
  152. ;;*
  153. ;;*        This procedure is used to setup the initial display for
  154. ;;*        the program installation.   
  155. ;;*
  156. ;;****************************************************************/
  157. Procedure SetupDisplay
  158.     ;; Setup logo and screen 
  159.     SetDefaultBitmap off        ;;gets rid of default bitmap
  160.     LoadBitMap 1 [LogoBitMap]    ;;loads pcmag bitmap Barb
  161.     ShowBitMap 1 @xy(5,5)
  162.     SetTopLineTo "PC Magazine CD Setup"
  163.     ;;SetBackgroundColor 255 255 255 255 255 255
  164.     ShowWindow Maximized
  165. EndProcedure
  166.  
  167. ;;*****************************************************************
  168. ;;*
  169. ;;* ShowWelcome 
  170. ;;*
  171. ;;* DESCRIPTION:      
  172. ;;*
  173. ;;*        This procedure is used to show a dialog box that displays
  174. ;;*        a welcome message to the end user and allows the user to
  175. ;;*        quit the installation. 
  176. ;;*
  177. ;;****************************************************************/
  178. Procedure ShowWelcome
  179.     DialogBox 220 130 UseHeader "Welcome" Returns [WelcomeBox]
  180.         Font   "Helv"   8
  181.         cText   @xy(10,14)  194 8 "Welcome to PC Magazine CD Volume 4 No. 2 installation."
  182.         lText   @xy(10,22)  200 8 ""
  183.         lText   @xy(10,30)  200 8 "This setup program will install the PC Magazine CD and all"
  184.         lText   @xy(10,38)  200 8 "associated files on your hard disk. You will have the option"
  185.         lText   @xy(10,46)  200 8 "of installing all files (recommended), or selecting portions"
  186.         lText   @xy(10,54)  200 8 "of the software to install according to your needs."
  187.         lText   @xy(10,62)  200 8 ""
  188.         lText   @xy(10,70)  200 8 "To quit the Setup program at anytime, choose Cancel Setup."
  189.         lText   @xy(10,78)  200 8 "Select the Continue button to proceed with the"
  190.         lText   @xy(10,86)  200 8 "Installation."
  191.               DefPushButton @xy(21, 110) 58 14 "Continue" [Continue]
  192.               PushButton @xy(135, 110) 58 14 "Cancel Setup" [Cancel]
  193.     EndDialogBox
  194.  
  195.     If [WelcomeBox] = [Cancel]
  196.         Do ByeNow    ;;Quit install now
  197.     EndIf
  198. EndProcedure
  199.  
  200. ;;*****************************************************************
  201. ;;*
  202. ;;* ShowDone 
  203. ;;*
  204. ;;* DESCRIPTION:      
  205. ;;*
  206. ;;*        This procedure is used to show the user a dialog box that
  207. ;;*        shows the program installation has been completed 
  208. ;;*        successfully. 
  209. ;;*
  210. ;;****************************************************************/
  211. Procedure ShowDone
  212.     DialogBox 220 130 UseHeader "PC Magazine CD"  Returns [FinalOKBox]
  213.         Font   "Helv"   8
  214.         lText   @xy(25,24) 220 8 "PC Magazine CD Volume 4, Number 2 Setup is" 
  215.         lText   @xy(25,32) 220 8 "complete. Enjoy the disc, and keep watch for"
  216.         lText    @xy(25,40) 220 8 "Volume 4, Number 3."
  217.         DefPushButton @xy(83, 110) 58 14 "Exit" [Continue];;acp 4.22.94
  218.     EndDialogBox
  219.     UnLoadBitmap 1
  220. EndProcedure
  221.  
  222. ;;*****************************************************************
  223. ;;*
  224. ;;* ComponentSelection 
  225. ;;*
  226. ;;* DESCRIPTION:      
  227. ;;*
  228. ;;*        This procedure is used to present a dialog to the user that
  229. ;;*        allows the selection of the desired components to install.
  230. ;;*        If the user hits the 'Cancel' button on the dialog, the 
  231. ;;*        installation will be terminated.  
  232. ;;*
  233. ;;****************************************************************/
  234. Procedure ComponentSelection 
  235.     DialogBox 260 165 UseHeader "PC Magazine CD Components" Returns [ComponentListBox]
  236.         Font        "Helv" 8
  237.         lText   @xy(10,4)  245 8 "The following is a list of components which will be installed on your hard"
  238.         lText   @xy(10,12) 245 8 "disk. You may de-select a particular component if you choose not to install"
  239.         lText   @xy(10,20) 245 8 "it. However, portions of this CD require that support files be installed."
  240.         lText   @xy(10,28) 245 8 "Therefore, we recommend that you install all elements to get the most out"
  241.         lText   @xy(10,36) 245 8 "of this edition of PC Magazine CD."
  242.         CheckBox    @xy(10,50) 8 12 ""     Uses [nInstallPCMagazineCD]
  243.             lText    @xy(25,52) 175 8 [PCMAG]
  244.             rText    @xy(210,50) 40 8 [PartSize]
  245.         CheckBox     @xy(10,62) 8 12    ""    Uses [nInstallBackIssueDB]
  246.             lText    @xy(25,64) 175 8 [CMPSEL]
  247.             lText    @xy(25,74) 175 8 [CMPSEL2]
  248.             rText    @xy(210,74) 40 8 [CmpSize] 
  249.         CheckBox     @xy(10,86) 8 12    ""    Uses [nInstallMSVideo]
  250.             lText    @xy(25,88)225 8 [MSVIDEO]
  251.             lText     @xy(25,98)225 8 [MSVIDEO1]
  252.             lText    @xy(25,108)225 8 [MSVIDEO2]
  253.             lText    @xy(25,118)225 8 [MSVIDEO3] 
  254.         DefPushButton @xy(50, 144) 60 15 "Continue"     [Continue] ;;1001
  255.            PushButton @xy(150, 144) 60 15 "Cancel Setup"     [Cancel] ;;1111 - changed 4.27.94 ACP
  256.     EndDialogBox
  257.     [nComponentFlag] := [nInstallPCMagazineCD] .or. [nInstallBackIssueDB] .or. [nInstallMSVideo] 
  258.     If [ComponentListBox] = [Cancel]
  259.         Do ByeNow    ;;Quit install now
  260.     EndIf
  261. EndProcedure
  262.  
  263. ;;*****************************************************************
  264. ;;*
  265. ;;* NoSelection 
  266. ;;*
  267. ;;* DESCRIPTION:      
  268. ;;*
  269. ;;*        This procedure is used to tell the user through a dialog
  270. ;;*        box that no components have been chosen to install.  If
  271. ;;*        the user hits the 'Continue' button, the user gets another 
  272. ;;*        opportunity to select components to install.  If the user 
  273. ;;*        hits the 'Cancel' button, the installation will terminate. 
  274. ;;*
  275. ;;****************************************************************/
  276. Procedure NoSelection
  277.     DialogBox 220 130 UseHeader "PC Magazine CD"  Returns [PleaseBox]
  278.         Font   "Helv"   8
  279.         cText   @xy(0,34) 220 8 "Please select at least 1 option.";;changed to 0,34 - ACP 4.27.94
  280.         DefPushButton @xy(21, 110) 58 14 "Continue"     [Continue]
  281.         PushButton @xy(135, 110) 58 14 "Cancel Setup" [Cancel] ;;1111
  282.     EndDialogBox
  283.  
  284.     If [PleaseBox] = [Cancel]
  285.         Do ByeNow    ;;Quit install now
  286.     EndIf
  287. EndProcedure
  288.  
  289. ;;*****************************************************************
  290. ;;*
  291. ;;* InstallPCMagazineCD 
  292. ;;*
  293. ;;* DESCRIPTION:      
  294. ;;*
  295. ;;*        This procedure is used to install the main PC Magazine
  296. ;;*        comnponents to the installation drive.  
  297. ;;*
  298. ;;****************************************************************/
  299. Procedure InstallPCMagazineCD
  300.     [nComponentFlag] := 1    ;;flag set to ensure at least one choice was selected
  301.     ;;[FileVer] := FileVersionOf [WindowsSystemDirectory]\ctl3dv2.dll
  302.     ;;if [FileVer] < 00002.00000.00005.00000
  303.     ;;    QueFileGroup 1 to [WindowsSystemDirectory] IfNewer NoInquiry
  304.     ;;    GetQuedFiles
  305.     ;;Endif
  306.     [ExePath] := [InstallFromDirectory]\[IconCmdLine]
  307.  
  308.     [IconPath] := [InstallFromDirectory]\[IconFile];; added for test
  309.     [UninstallIconPath] := [InstallFromDirectory]\[UninstallIcon]
  310.  
  311.     ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  312.     ;; Use ProgramManagerDDe to create a group ;;
  313.     ;; and add a simple icon feature       ;;
  314.  
  315.     ProgramManagerDDe
  316.         CreateGroup([ProductGroup],1)
  317.         AddItem([ExePath],[ProductName],[IconPath])
  318.         ;; added icon for readme file                       
  319.         AddItem([WindowsDirectory]\write.exe [InstallFromDrive]:\readme.wri,[VolumeNumber] Readme)
  320.         ;; AddItem([InstallFromDrive]:\uninst\uninst.exe, Remove [VolumeNumber], [UninstallIconPath])
  321.         ExitProgman(1)    
  322.     EndProgramManagerDDE
  323.  
  324.     [InstalledFlag] := 0
  325. EndProcedure
  326.  
  327. ;;*****************************************************************
  328. ;;*
  329. ;;* InstallMSVideo 
  330. ;;*
  331. ;;* DESCRIPTION:      
  332. ;;*
  333. ;;*        This procedure is used to call the Video for Windows
  334. ;;*        installation program. 
  335. ;;*
  336. ;;****************************************************************/
  337. Procedure InstallMSVideo
  338.     [nComponentFlag] := 1
  339.     SetExitConfirmationPrompt off
  340.     Run [InstallFromDrive]:\VFW11\setup.exe    ;;from CD root  Barb
  341. EndProcedure
  342.  
  343. ;;*****************************************************************
  344. ;;*
  345. ;;* InstallBackIssueDB 
  346. ;;*
  347. ;;* DESCRIPTION:      
  348. ;;*
  349. ;;*        This procedure is used to call the back issue database
  350. ;;*        installation program. 
  351. ;;*
  352. ;;****************************************************************/
  353. Procedure InstallBackIssueDB
  354.     [nComponentFlag] := 1
  355.     ;;1. InstDrive = [InstDrive] this is blank - gets erased at some point - [installFromDrive] works.
  356.     SetMouseCursor Arrow
  357.     Run [InstallFromDrive]:\setupw.exe    ;;from CD root Barb
  358. EndProcedure
  359.  
  360. ;;*****************************************************************
  361. ;;*
  362. ;;* InstallWinCim 
  363. ;;*
  364. ;;* DESCRIPTION:      
  365. ;;*
  366. ;;*        This procedure is used to call the WinCim installation
  367. ;;*        program. 
  368. ;;*
  369. ;;****************************************************************/
  370. Procedure InstallWinCim
  371.     [nComponentFlag] := 1
  372.     Run [InstallFromDrive]:\wincim\wcinst.exe
  373. EndProcedure
  374.  
  375. ;;*****************************************************************
  376. ;;*
  377. ;;* ShowGroups 
  378. ;;*
  379. ;;* DESCRIPTION:      
  380. ;;*
  381. ;;*        This procedure is used to refresh the display of the
  382. ;;*        Windows groups so the new groups this program created
  383. ;;*        will be showing. 
  384. ;;*
  385. ;;****************************************************************/
  386. Procedure ShowGroups
  387.     ProgramManagerDDE
  388.         ShowGroup([ProductGroup], 2)
  389.         ShowGroup([ProductGroup], 1)
  390.     EndProgramManagerDDE
  391. EndProcedure
  392.  
  393. ;;*****************************************************************
  394. ;;*
  395. ;;* DDENonFatalErrorTrap 
  396. ;;*
  397. ;;* DESCRIPTION:      
  398. ;;*
  399. ;;*        This procedure is used to intercept the non-fatal errors 
  400. ;;*        that may occur when executing the ProgramManagerDDE functions:
  401. ;;*        such as creating Windows groups, deleting groups, showing
  402. ;;*        groups, and adding group items.  The non-fatal errors that can
  403. ;;*        occur are as follows:
  404. ;;*             Possible Text Error Codes Are:
  405. ;;*              ddeExec%s failed      (NOTE:  the "%s" is replaced by error types)
  406. ;;*              ddeInitiate failed
  407. ;;*              pmAddItem failed
  408. ;;*              pmClose failed
  409. ;;*              pmCreateGroup failed 
  410. ;;*
  411. ;;****************************************************************/
  412. Procedure DDENonFatalErrorTrap
  413.    [Number1] := PositionOf "PMAddItem" in DDENonFatalError
  414.    If [Number1] > 0 
  415.       Dialog
  416.         NonFatal error in AddItem occurred
  417.         Error Text : DDENonFatalError
  418.       EndDialog
  419.    EndIf
  420.    [Number1] := PositionOf "PMDeleteItem" in DDENonFatalError
  421.    If [Number1] > 0 
  422.       Dialog
  423.         NonFatal error in DeleteItem occurred
  424.         Error Text : DDENonFatalError
  425.       EndDialog
  426.    EndIf
  427.  
  428. EndProcedure
  429.  
  430. ;;*****************************************************************
  431. ;;*
  432. ;;* ByeNow 
  433. ;;*
  434. ;;* DESCRIPTION:      
  435. ;;*
  436. ;;*        This procedure is used to tell the user that the 
  437. ;;*        installation program has terminated, and to end the
  438. ;;*        installation. 
  439. ;;*
  440. ;;****************************************************************/
  441. Procedure ByeNow 
  442.     DialogBox 220 130 UseHeader "PC Magazine CD"  Returns [FinalOKBox]    ;;new Dialog 4.27
  443.         Font   "Helv"   8
  444.         cText   @xy(0,24) 220 8 "Installation has terminated. Please press Exit."  
  445.         DefPushButton @xy(83, 110) 58 14 "Exit" [Continue];;acp 4.22.94
  446.     EndDialogBox
  447.  
  448.     UnLoadBitmap    1
  449.     SoLong Quietly
  450. EndProcedure
  451.  
  452. ;;********************************************************************
  453. ;;
  454. ;; End of procedure area
  455. ;;
  456. ;;********************************************************************
  457.  
  458. EndScript   ;;end of program
  459.